<!DOCTYPE html>
<html lang="en" style="background:#fff;">
<head>
    <base href="${basePath}">
    <#include "common/top.html"/>
</head>
<body style="background:#fff;overflow: hidden">
<form class="layui-form" modelAttribute="uArea" name="form1" id="form1" method="post">
    <div class="layui-form-item-dept">

        <div class="layui-form-item">
            <label class="layui-form-label">预警值：</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="yujingvalue" id="yujingvalue" maxlength="50"
                       placeholder="这里输入预警值" title="预警值"/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><span
                    style="color: red;">*</span>地面钻孔参与的类型：</label>
            <div class="layui-input-inline">
                <@c.dictselect type='groundtype' code=''>
            </@c.dictselect>
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">预警级别：</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="yujinglevel" id="yujinglevel" maxlength="50"
                       placeholder="这里输入预警级别" title="预警级别"/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">是否使用预警功能：</label>
            <div class="layui-input-inline">
                <select name="yujinguse" id="yujinguse" lay-filter="yujinguse">
                    <option value="0">是</option>
                    <option value="1">否</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><span
                    style="color: red;">*</span>区域名：</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="name" id="name" maxlength="50"
                       placeholder="这里输入区域名" title="区域名"/>
            </div>
        </div>
    </div>
</form>
</body>
<script type="text/javascript">

    layui.use(['form', 'table', 'laydate'], function () {
        var form = layui.form;
        var laydate = layui.laydate;

        form.render();

    });


    function submitHandler() {
        var prefix = basePath + "device/area";
        $.operate.post(prefix + '/addUArea', $("#form1").serializeArray(), function (result) {
            if (result.status == true) {
                layer.alert(result.msg, function (index) {
                    var index1 = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index1);
                    layer.close(index);
                });
            } else {
                parent.layer.alert(result.msg);
            }
        });
    }
</script>
</body>
</html>
